package com.lill.system.api;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.lill.common.component.util.R;
import com.lill.system.model.SysDomainEntity;
import com.lill.system.service.ISysDomainService;

/**
 * 域对象Controller
 *
 * @author lill
 */
@RestController
@RequestMapping("api/sysdomain")
public class SysDomainApi {
    @Autowired
    private ISysDomainService domainService;

    /**
     * 查看所有列表
     */
    @RequestMapping("/queryOne")
    public R queryAll() {
        Map<String, Object> params = new HashMap<>();
        List<SysDomainEntity> list= domainService.queryList(params);
        if (list != null && list.size() > 0 ) {
            return R.ok().put("domain",list.get(0));
        }
        return R.ok().put("domain", null);
    }
}
